<!--
  ###license-information-start###
  E-PIX - Enterprise Patient Identifier Cross-referencing
  __
  Copyright (C) 2009 - 2017 The MOSAIC Project - Institut fuer Community Medicine der
  							Universitaetsmedizin Greifswald - mosaic-projekt@uni-greifswald.de
  							concept and implementation
  							c. schack, d.langner, l. geidel
  							web client
  							a. blumentritt
  							g. weiher
  							please cite our publications
  							http://dx.doi.org/10.3414/ME14-01-0133
  							http://dx.doi.org/10.1186/s12967-015-0545-6
  __
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Affero General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.
  
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
  You should have received a copy of the GNU Affero General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  ###license-information-end###
  -->
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:jstl="http://java.sun.com/jsp/jstl/functions" xmlns:p="http://primefaces.org/ui">
	<h:form id="dashboardMainForm">

		<p:dataTable id="tblid" var="details" value="#{StatController.lastStat.mappedStatValue.entrySet()}" paginatorTemplate="" paginator="false" rows="10"
			style="margin-bottom:20px">

			<p:column>
				<f:facet name="header">
					<h:outputText value="#{msg['label.statistic.attributeheading']}" />
				</f:facet>
				<h:outputText value="#{details.key}" />
			</p:column>

			<p:column>
				<f:facet name="header">
					<h:outputText value="#{msg['label.statistic.countheading']} (#{StatController.lastStat.entrydate})" />
				</f:facet>
				<h:outputText value="#{details.value}" />
			</p:column>

		</p:dataTable>

		<p:commandButton value="#{msg['label.statistic.downloadcsv']}" ajax="false" icon="ui-icon-disk">
			<p:dataExporter type="csv" target="tblid" fileName="epix_stats" />
		</p:commandButton>

		<p:commandButton value="#{msg['label.statistic.downloadpdf']}" ajax="false" icon="ui-icon-disk">
			<p:dataExporter type="pdf" target="tblid" fileName="epix_stats" />
		</p:commandButton>

	</h:form>
</ui:composition>
